  <div class="entry">
    <div class="top"><%= link_to(h(blog_entry.title), target_link(blog_entry)) %></div>
    <div class="main">
      <%= blog_body blog_entry %>
      <% blog_entry.attachments.each do |attachment| %>
        <%= render(
              :partial => "attachments/#{attachment.attachable_type.tableize.singularize}", 
              :object => attachment.attachable, 
              :locals => {
                :attachee => blog_entry } ) %>
      <% end %>
    </div>
    <div class="bottom">
      <div class="posted">
        Posted on <%= display_date blog_entry.created_at %>
      </div>
      <div class="comments-toggle">
        <%= link_to_function(
              pluralize(blog_entry.comments.size, "Comment"), 
              "$(this).up('div.entry').down('div.comments').toggle(); return false;" )%>
      </div>
      <div class="tags">
        <% if blog_entry.tags.size > 0 %>
          Tagged under: <%= tags_of blog_entry %>
        <% else %>
          <br/>
        <% end %>
      </div>
      <br class="clear" />
    </div>
    <div class="comments" style="<%= "display: none;" unless @permalinked %>">
      <%= render :partial => "comments/list", :locals => { :target => blog_entry } %>
    </div>
  </div>
